With development of information technologies, a video signal, because of advantages such as intuitiveness and high-efficiency, becomes the most important manner of obtaining information in people's daily life. Because a video signal includes a large amount of data, and needs to occupy a large amount of transmission bandwidth and storage space, to efficiently transmit and store the video signal, compression coding needs to be performed on the video signal. In addition, as video services rapidly develop, such as high definition television, online meeting, IPTV, or 3D television, and people have a higher requirement for video quality, a video compression technology has increasingly become an indispensable key technology in the video application field.
Video coding uses the information theory provided by C. E. Shannon as a theoretical basis, for the purpose of effectively removing redundancy information between video signals and maximizing compression efficiency. In a research process of a video coding technology, new algorithms and theories appear one after another. For example, redundancy information between video signals can be effectively removed and processed by using an encoding method such as DPCM, transform coding, or Huffman coding. Establishment of a quantization theory and a rate-distortion theory can guide an encoding process more efficiently. In addition, technologies such as motion estimation, deblocking filtering, and adaptive loop filtering are generated based on a feature of a video itself.
It is well-known that an information processing capability of a human visual system is far stronger than that of a current video processing system. In addition, because a human eye is an ultimate recipient, it is particularly important to analyze a video distortion feature based on a feature of a human-eye visual system, and design a high-efficiency video coding method based on a video feature. Researches show that neither a sum of absolute differences (SAD) nor a sum of squared differences (SSD) in use for a long time in a rate-distortion optimization method of video coding can well reflect subjective perception of a human eye to an image. In recent years, the research community successively puts forward distortion measurement functions including a JND and an SSIM, and applies the functions to video coding.
The prior art provides an SSIM-based rate-distortion optimization encoding method implemented on H.264/AVC. As shown in the formula (1), a reciprocal of SSIM is first used as a function to measure subjective distortion, and is applied to a method for adjusting a Lagrange multiplier of rate-distortion optimization. δx is a variance of a current macroblock, MSE is a mean square error of a current coding unit, and c2 is a constant.
                              1                      S            ⁢                                                  ⁢            S            ⁢                                                  ⁢            I            ⁢                                                  ⁢            M                          ≈                  1          +                                    M              ⁢                                                          ⁢              S              ⁢                                                          ⁢              E                                                      2                ⁢                                  δ                  x                  2                                            +                              c                2                                                                        (        1        )            
In the prior art, an SSIM-based subjective distortion evaluation function is used to improve a rate-distortion optimization algorithm of the current coding unit in mode selection, so as to compress an image and improve subjective quality. However, a Lagrange multiplier of a coding unit is determined according to a local feature of the coding unit. As a result, when motion estimation is performed for a predict unit in the coding unit by using the Lagrange multiplier of the coding unit, prediction is inaccurate, and a residual of the predict unit is relatively large. Further, encoding the residual consumes a relatively large bit rate, resulting in relatively low video coding efficiency.